﻿using System;
using System.Collections.Generic;
using System.Data.Entity.ModelConfiguration;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace CubicFWNet.Data.Models.Mapping
{
    class PurchasePrintMap : EntityTypeConfiguration<PurchasePrint>
    {
        public PurchasePrintMap()
        {
            // Primary Key
            this.HasKey(t => t.Id);

            this.Property(t => t.ProductName)
                .HasMaxLength(128);

            this.Property(t => t.Memo)
                .HasMaxLength(256);

            // Table & Column Mappings
            this.ToTable("PurchasePrint");
            this.Property(t => t.Id).HasColumnName("Id");
            this.Property(t => t.SupplierId).HasColumnName("SupplierId");
            this.Property(t => t.ProductId).HasColumnName("ProductId");
            this.Property(t => t.ProductName).HasColumnName("ProductName");
            this.Property(t => t.Amount).HasColumnName("Amount");
            this.Property(t => t.CreateTime).HasColumnName("CreateTime");
            this.Property(t => t.Status).HasColumnName("Status");
            this.Property(t => t.Memo).HasColumnName("Memo");
        }
    }
}
